home *** CD-ROM | disk | FTP | other *** search
-
-
-
- AAAATTTTTTTTRRRR____MMMMUUUULLLLTTTTIIII((((2222)))) AAAATTTTTTTTRRRR____MMMMUUUULLLLTTTTIIII((((2222))))
-
-
-
- NNNNAAAAMMMMEEEE
- attr_multi, attr_multif - manipulate multiple user attributes on a
- filesystem object at once
-
- CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////aaaattttttttrrrriiiibbbbuuuutttteeeessss....hhhh>>>>
-
- iiiinnnntttt aaaattttttttrrrr____mmmmuuuullllttttiiii ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ppppaaaatttthhhh,,,, aaaattttttttrrrr____mmmmuuuullllttttiiiioooopppp____tttt ****oooopppplllliiiisssstttt,,,,
- iiiinnnntttt ccccoooouuuunnnntttt,,,, iiiinnnntttt ffffllllaaaaggggssss))));;;;
-
- iiiinnnntttt aaaattttttttrrrr____mmmmuuuullllttttiiiiffff ((((iiiinnnntttt ffffdddd,,,, aaaattttttttrrrr____mmmmuuuullllttttiiiioooopppp____tttt ****oooopppplllliiiisssstttt,,,,
- iiiinnnntttt ccccoooouuuunnnntttt,,,, iiiinnnntttt ffffllllaaaaggggssss))));;;;
-
- OOOOVVVVEEEERRRRVVVVIIIIEEEEWWWW
- The _a_t_t_r group of system calls implement the ability for a user to attach
- name/value pairs to objects within the filesystem.
-
- They could be used to store meta-information about the file. For example
- "character-set=kanji" could tell a document browser to use the Kanji
- character set when displaying that document and "thumbnail=..." could
- provide a reduced resolution overview of a high resolution graphic image.
-
- The _n_a_m_e_s can be up to MAXNAMELEN bytes in length, terminated by the
- first 0 byte. The intent is that they be printable ASCII (or other
- character set) names for the attribute.
-
- The _v_a_l_u_e_s can be up to ATTR_MAX_VALUELEN (currently 64KB) of arbitrary
- binary data.
-
- Attributes can be attached to all types of inodes: regular files,
- directories, symbolic links, device nodes, etc.
-
- There are 2 disjoint attribute name spaces associated with every
- filesystem object. They are the rrrrooooooootttt and uuuusssseeeerrrr address spaces. The rrrrooooooootttt
- address space is accessible only to privileged users, and only then by
- specifying a flag argument to the function call. A privileged user can
- be either the superuser in an IIIIRRRRIIIIXXXX environment, or a user with
- CCCCAAAAPPPP____DDDDEEEEVVVVIIIICCCCEEEE____MMMMGGGGTTTT capability. Other users will not see or be able to modify
- attributes in the rrrrooooooootttt address space. The uuuusssseeeerrrr address space is
- protected by the normal file permissions mechanism, so the owner of the
- file can decide who is able to see and/or modify the value of attributes
- on any particular file.
-
- Attributes are currently fully supported only in the XFS and CXFS
- filesystem types. Other filesystem types may provide a partial
- implementation.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The _a_t_t_r__m_u_l_t_i and _a_t_t_r__m_u_l_t_i_f functions provide a way to operate on
- multiple attributes of a filesystem object at once.
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- AAAATTTTTTTTRRRR____MMMMUUUULLLLTTTTIIII((((2222)))) AAAATTTTTTTTRRRR____MMMMUUUULLLLTTTTIIII((((2222))))
-
-
-
- _P_a_t_h points to a path name for a filesystem object, and _f_d refers to the
- file descriptor associated with a file. The _o_p_l_i_s_t is an array of
- _aaaa_tttt_tttt_rrrr______mmmm_uuuu_llll_tttt_iiii_oooo_pppp______tttt structures. Each element in that array describes a single
- attribute operation and provides all the information required to carry
- out that operation and to check for success or failure of that operation.
- _C_o_u_n_t tells how many elements are in the _o_p_l_i_s_t array.
-
- The contents of an _aaaa_tttt_tttt_rrrr______mmmm_uuuu_llll_tttt_iiii_oooo_pppp______tttt structure include the following
- members:
-
- _iiii_nnnn_tttt _aaaa_mmmm______oooo_pppp_cccc_oooo_dddd_eeee_;;;; _////_**** _wwww_hhhh_iiii_cccc_hhhh _oooo_pppp_eeee_rrrr_aaaa_tttt_iiii_oooo_nnnn _tttt_oooo _pppp_eeee_rrrr_ffff_oooo_rrrr_mmmm _((((_ssss_eeee_eeee _bbbb_eeee_llll_oooo_wwww_)))) _****_////
- _iiii_nnnn_tttt _aaaa_mmmm______eeee_rrrr_rrrr_oooo_rrrr_;;;; _////_**** _[[[[_oooo_uuuu_tttt _aaaa_rrrr_gggg_]]]] _rrrr_eeee_ssss_uuuu_llll_tttt _oooo_ffff _tttt_hhhh_iiii_ssss _ssss_uuuu_bbbb_----_oooo_pppp _((((_aaaa_nnnn _eeee_rrrr_rrrr_nnnn_oooo_)))) _****_////
- _cccc_hhhh_aaaa_rrrr _****_aaaa_mmmm______aaaa_tttt_tttt_rrrr_nnnn_aaaa_mmmm_eeee_;;;; _////_**** _aaaa_tttt_tttt_rrrr_iiii_bbbb_uuuu_tttt_eeee _nnnn_aaaa_mmmm_eeee _tttt_oooo _wwww_oooo_rrrr_kkkk _wwww_iiii_tttt_hhhh _****_////
- _cccc_hhhh_aaaa_rrrr _****_aaaa_mmmm______aaaa_tttt_tttt_rrrr_vvvv_aaaa_llll_uuuu_eeee_;;;; _////_**** _[[[[_iiii_nnnn_////_oooo_uuuu_tttt _aaaa_rrrr_gggg_]]]] _aaaa_tttt_tttt_rrrr_iiii_bbbb_uuuu_tttt_eeee _vvvv_aaaa_llll_uuuu_eeee _((((_rrrr_aaaa_wwww _bbbb_yyyy_tttt_eeee_ssss_)))) _****_////
- _iiii_nnnn_tttt _aaaa_mmmm______llll_eeee_nnnn_gggg_tttt_hhhh_;;;; _////_**** _[[[[_iiii_nnnn_////_oooo_uuuu_tttt _aaaa_rrrr_gggg_]]]] _llll_eeee_nnnn_gggg_tttt_hhhh _oooo_ffff _vvvv_aaaa_llll_uuuu_eeee _****_////
- _iiii_nnnn_tttt _aaaa_mmmm______ffff_llll_aaaa_gggg_ssss_;;;; _////_**** _ffff_llll_aaaa_gggg_ssss _((((_bbbb_iiii_tttt_----_wwww_iiii_ssss_eeee _OOOO_RRRR _oooo_ffff _####_dddd_eeee_ffff_iiii_nnnn_eeee_ssss _bbbb_eeee_llll_oooo_wwww_)))) _****_////
-
- The _a_m__o_p_c_o_d_e field defines how the remaining fields are to be
- interpreted and can take on one of the following values:
-
- _AAAA_TTTT_TTTT_RRRR______OOOO_PPPP______GGGG_EEEE_TTTT _////_**** _rrrr_eeee_tttt_uuuu_rrrr_nnnn _tttt_hhhh_eeee _iiii_nnnn_dddd_iiii_cccc_aaaa_tttt_eeee_dddd _aaaa_tttt_tttt_rrrr_''''_ssss _vvvv_aaaa_llll_uuuu_eeee _****_////
- _AAAA_TTTT_TTTT_RRRR______OOOO_PPPP______SSSS_EEEE_TTTT _////_**** _ssss_eeee_tttt_////_cccc_rrrr_eeee_aaaa_tttt_eeee _tttt_hhhh_eeee _iiii_nnnn_dddd_iiii_cccc_aaaa_tttt_eeee_dddd _aaaa_tttt_tttt_rrrr_////_vvvv_aaaa_llll_uuuu_eeee _pppp_aaaa_iiii_rrrr _****_////
- _AAAA_TTTT_TTTT_RRRR______OOOO_PPPP______RRRR_EEEE_MMMM_OOOO_VVVV_EEEE _////_**** _rrrr_eeee_mmmm_oooo_vvvv_eeee _tttt_hhhh_eeee _iiii_nnnn_dddd_iiii_cccc_aaaa_tttt_eeee_dddd _aaaa_tttt_tttt_rrrr _****_////
-
- The _a_m__e_r_r_o_r field will contain the appropriate error result code if that
- sub-operation fails. The result codes for a given sub-operation are a
- subset of the result codes that are possible from the corresponding
- single-attribute function call. For example, the result code possible
- from an _AAAA_TTTT_TTTT_RRRR______OOOO_PPPP______GGGG_EEEE_TTTT sub-operation are a subset of those that can be
- returned from an _a_t_t_r__g_e_t function call.
-
- The _a_m__a_t_t_r_n_a_m_e field is a pointer to a NULL terminated string giving the
- attribute name that the sub-operation should operate on.
-
- The _a_m__a_t_t_r_v_a_l_u_e, _a_m__l_e_n_g_t_h and _a_m__f_l_a_g_s fields are used to store the
- value of the named attribute, and some control flags for that sub-
- operation, respectively. Their use varies depending on the value of the
- _a_m__o_p_c_o_d_e field.
-
- AAAATTTTTTTTRRRR____OOOOPPPP____GGGGEEEETTTT
- The _a_m__a_t_t_r_v_a_l_u_e field is a pointer to a empty buffer that will be
- overwritten with the value of the named attribute. The _a_m__l_e_n_g_t_h
- field is initially the total size of the memory buffer that the
- _a_m__a_t_t_r_v_a_l_u_e field points to. After the operation, the _a_m__l_e_n_g_t_h
- field contains the actual size of the attribute's value. The
- _a_m__f_l_a_g_s field may be set to the _AAAA_TTTT_TTTT_RRRR______RRRR_OOOO_OOOO_TTTT flag. If the process has
- appropriate priviledges, the ROOT namespace will be searched for the
- named attribute, otherwise the USER namespace will be searched.
-
- AAAATTTTTTTTRRRR____OOOOPPPP____SSSSEEEETTTT
- The _a_m__a_t_t_r_v_a_l_u_e and _a_m__l_e_n_g_t_h fields contain the new value for the
- given attribute name and its length. The _AAAA_TTTT_TTTT_RRRR______RRRR_OOOO_OOOO_TTTT flag may be set
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- AAAATTTTTTTTRRRR____MMMMUUUULLLLTTTTIIII((((2222)))) AAAATTTTTTTTRRRR____MMMMUUUULLLLTTTTIIII((((2222))))
-
-
-
- in the _a_m__f_l_a_g_s field. If the process has appropriate priviledges,
- the ROOT namespace will be searched for the named attribute,
- otherwise the USER namespace will be searched. The _AAAA_TTTT_TTTT_RRRR______CCCC_RRRR_EEEE_AAAA_TTTT_EEEE and
- the _AAAA_TTTT_TTTT_RRRR______RRRR_EEEE_PPPP_LLLL_AAAA_CCCC_EEEE flags may also be set in the _a_m__f_l_a_g_s field (but
- not simultaneously). If the _AAAA_TTTT_TTTT_RRRR______CCCC_RRRR_EEEE_AAAA_TTTT_EEEE flag is set, the sub-
- operation will set the _a_m__e_r_r_o_r field to EEXIST if the named
- attribute already exists. If the _AAAA_TTTT_TTTT_RRRR______RRRR_EEEE_PPPP_LLLL_AAAA_CCCC_EEEE flag is set, the
- sub-operation will set the _a_m__e_r_r_o_r field to ENOATTR if the named
- attribute does not already exist. If neither of those two flags are
- set and the attribute does not exist, then the attribute will be
- created with the given value. If neither of those two flags are set
- and the attribute already exists, then the value will be replaced
- with the given value.
-
- AAAATTTTTTTTRRRR____OOOOPPPP____RRRREEEEMMMMOOOOVVVVEEEE
- The _a_m__a_t_t_r_v_a_l_u_e and _a_m__l_e_n_g_t_h fields are not used and are ignored.
- The _a_m__f_l_a_g_s field may be set to the _AAAA_TTTT_TTTT_RRRR______RRRR_OOOO_OOOO_TTTT flag. If the process
- has appropriate priviledges, the ROOT namespace will be searched for
- the named attribute, otherwise the USER namespace will be searched.
-
- The _f_l_a_g_s argument to the _a_t_t_r__m_u_l_t_i call is used to control following of
- symbolic links in the _p_a_t_h argument. The default is to follow symbolic
- links, _f_l_a_g_s should be set to ATTR_DONTFOLLOW to not follow symbolic
- links.
-
- _a_t_t_r__m_u_l_t_i will fail if one or more of the following are true:
-
- [ENOENT] The named file does not exist.
-
- [EPERM] The effective user ID does not match the owner of the
- file and the effective user ID is not super-user.
-
- [ENOTDIR] A component of the path prefix is not a directory.
-
- [EACCES] Search permission is denied on a component of the path
- prefix.
-
- [EINVAL] A bit other than ATTR_DONTFOLLOW was set in the _f_l_a_g
- argument.
-
- [EFAULT] _P_a_t_h, or _o_p_l_i_s_t points outside the allocated address
- space of the process.
-
- [ELOOP] A path name lookup involved too many symbolic links.
-
- [ENAMETOOLONG] The length of _p_a_t_h exceeds {_M_A_X_P_A_T_H_L_E_N}, or a pathname
- component is longer than {_M_A_X_N_A_M_E_L_E_N}.
-
- _a_t_t_r__m_u_l_t_i_f will fail if:
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- AAAATTTTTTTTRRRR____MMMMUUUULLLLTTTTIIII((((2222)))) AAAATTTTTTTTRRRR____MMMMUUUULLLLTTTTIIII((((2222))))
-
-
-
- [EINVAL] A bit was set in the _f_l_a_g argument, or _f_d refers to a
- socket, not a file.
-
- [EFAULT] _O_p_l_i_s_t points outside the allocated address space of the
- process.
-
- [EBADF] _F_d does not refer to a valid descriptor.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- attr(1),
- attr_get(2), attr_getf(2),
- attr_list(2), attr_list(2)
- attr_remove(2), attr_removef(2),
- attr_set(2), attr_set(2)
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Upon successful completion of the _a_t_t_r__m_u_l_t_i call, a value of 0 is
- returned. Otherwise, a value of -1 is returned and _e_r_r_n_o is set to
- indicate the error. Note that the individual operations listed in the
- _o_p_l_i_s_t array each have their own error return fields. The _e_r_r_n_o variable
- only records the result of the _a_t_t_r__m_u_l_t_i call itself, not the result of
- any of the sub-operations.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-